//
//  KABMallProductCCell.m
//  kabu
//
//  Created by XiangDongMBP on 2017/2/16.
//  Copyright © 2017年 East. All rights reserved.
//

#import "KABMallProductCCell.h"
#import "GlobalHeader.h"
#import "UIColor+XDHex.h"
#import "KABModel.h"
#import <YYWebImage.h>


@implementation KABMallProductCCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.contentView.layer.borderWidth = 1;
    self.contentView.layer.borderColor = [UIColor xd_colorWithHex:KABGlobalColorTableSepLine].CGColor;
}

- (void)configViewWithProductItem:(KABMallProListItem *)item {
    [self.coverImgView yy_setImageWithURL:[NSURL URLWithString:item.cover_image_url] placeholder:[KABDefaultVarModel sharedInstance].smallDefaultImg options:YYWebImageOptionSetImageWithFadeAnimation completion:nil];
    
    self.nameLabel.text = item.name;
    self.subTitleLabel.text = item.shop_name;
    self.priceLabel.text = [NSString stringWithFormat:@"￥%.2f", item.original_price / 100.0];
}

@end
